﻿using HardcoreGame.Common.CustomSets;
using HardcoreGame.Content.Items.Ammo.SlingBullets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;

namespace HardcoreGame.Content.Items.Weapons.Ranged.Slingshot
{
    public class MeteorSlingshoot : ModItem
    {
        public override void SetStaticDefaults()
        {
            CustomItemSets.Slingshoot[Type] = true;
        }
        public override void SetDefaults()
        {
            Item.DefaultToRangedWeapon(ModContent.ProjectileType<Projectiles.Ammo.MeteorSlingBullet>(), ModContent.ItemType<StoneSlingBullet>(), 40, 9.5f, true);
            Item.damage = 30;
            Item.width = Item.height = 26;
            Item.useStyle = ItemUseStyleID.Shoot;
            Item.knockBack = 2.9f;
            Item.value = 800;
            Item.rare = ItemRarityID.Blue;
            Item item = Item;
            SoundStyle item2 = SoundID.Item5;
            item.UseSound = new SoundStyle?(item2.WithPitchOffset(0.2f));
        }
        public override Vector2? HoldoutOffset()
        {
            return new Vector2?(new Vector2(-2f, -2f));
        }
        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddIngredient(117, 10);
            modRecipe.AddTile(TileID.Anvils);
            modRecipe.Register();
        }
    }
}
